package com.travel.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.travel.common.pojo.User;
import com.travel.common.pojo.UserExample;
import com.travel.dao.UserMapper;
import com.travel.service.UserService;
@Service
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper userMapper;
	@Override
	public List<User> getUserByUsername(String username) {
		UserExample userExample = new UserExample();
		UserExample.Criteria criteria = userExample.createCriteria();
		criteria.andUsernameEqualTo(username);
		return userMapper.selectByExample(userExample);
	}

	@Override
	public List<User> getUserList() {
		return userMapper.selectByExample(null);
	}

	
}
